-
Notifications
You must be signed in to change notification settings - Fork 42
[FIX] Add dummy get_input_embeddings to fix vLLM model type check #971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
79d6f2d to
80ab177
Compare
59e1a8e to
bc8fe75
Compare
karan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
|
Hi @karan, |
Thank you for the contribution. I'll run the ci manually and will merge when if it all passes. |
|
hmm seems like the branch is outdated. can you update it? |
Signed-off-by: Allen Jia <kuafou@gmail.com>
Signed-off-by: Allen Jia <kuafou@gmail.com>
bc8fe75 to
85606aa
Compare
Hi, @kyuyeunk . I had updated this pr. |
|
except for already failing tests, verified that all tests passes. merging the pr. |
Description
This PR fixes a compatibility issue with recent vLLM changes that now require model classes to implement a
get_input_embeddings()method.Without this method, vLLM fails its interface validation during model registration, breaking TPU model integration.
To address this, we add a dummy
get_input_embeddings()implementation to the vLLM-compatible wrapper class intpu_inference/models/common/model_loader.py.Similar to the existing dummy
forward()method, this implementation only satisfies vLLM’s type checks and raisesNotImplementedErrorif invoked. This prevents JAX model initialization during import or introspection.Why this change is needed
get_input_embeddings()(link).
get_input_embeddings, vLLM failed model registration checks.Implementation details
unimplemented_get_input_embeddings()dummy function to the wrapper type.tests/test_vllm_wrapper.pyto ensure:get_input_embeddings().NotImplementedError.is_vllm_model()validation.Related Issue
Fixes: #951
Tests
Checklist
Before submitting this PR, please make sure: